/**
 * 功能描述
 */

define(function(require, exports, module) {
	var MultiRowGrid=require("multirowgrid");
	var component={
			initComponent:function(params,widget){
			var detailgrid=new MultiRowGrid({
	
				parentNode : ".J-detailgrid",
				autoRender: false,
				url: "api/cate/mealrecord/queryoneperson",
        		model:{ 
        			id: "detailgrid",
					multiField:"dishes",
                    allowEdit: false,
                    head: {
                    	//在这里设置一个空的head，就可以出现Grid中设置的title了。很奇怪。
                    },
        			columns:[{
        				key:"number",
        				name:"卡号",
        			},{
        				key:"operateDate",
        				name:"时间",
        				format : "date",
        			},{
        				key:"dishes",
						name:"菜品",
						multiKey:"name",
						isMulti:true,
        			},{
        				key:"money",
        				name:"消费金额(元)",
        				format:function(value){
        					return parseFloat(value).toFixed(2);
        				}
        			}]
        		}
			});
			widget.set("detailgrid",detailgrid);
		}
	
	};
	module.exports = component;
});
